package com.ugoodtech.mdcc.core.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

@ApiModel("投诉报告人所处理的记录")
@Entity
@Table(name = "complaint_user")
public class ComplaintUser extends BaseEntity {

    @ApiModelProperty("用时")
    private String useTime;

    @ApiModelProperty("类型")
    private Integer type;

    @ApiModelProperty("是否在有效时间内完成")
    private boolean isTimeOut = true;

    @ApiModelProperty("投诉报告ID")
    private ComplaintReport complaintReport;

    @ApiModelProperty("用户ID")
    private User user;

    @Column(name = "use_time")
    public String getUseTime() {
        return useTime;
    }

    public void setUseTime(String useTime) {
        this.useTime = useTime;
    }

    @Column(name = "report_type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "is_time_out")
    public boolean isTimeOut() {
        return isTimeOut;
    }

    public void setTimeOut(boolean timeOut) {
        isTimeOut = timeOut;
    }

    @ManyToOne
    @JoinColumn(name = "complaint_report_id")
    public ComplaintReport getComplaintReport() {
        return complaintReport;
    }

    public void setComplaintReport(ComplaintReport complaintReport) {
        this.complaintReport = complaintReport;
    }

    @ManyToOne
    @JoinColumn(name = "user_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
